sending_rate=scan(file="/Volumes/Data/gSVN/ethernet-switch/paper/plots/single_flow_fixed_pkt_size/sending_rate.txt");

delay_ng=scan(file="/Volumes/Data/gSVN/ethernet-switch/paper/plots/single_flow_fixed_pkt_size/delay_ng.txt");
delay_3com=scan(file="/Volumes/Data/gSVN/ethernet-switch/paper/plots/single_flow_fixed_pkt_size/delay_3com.txt");

#quartz();
postscript("/Volumes/Data/gSVN/ethernet-switch/paper/figures/single_flow_rate_vs_delay.eps", width=3.6, height=2.2, horizontal=FALSE, onefile=TRUE);

#The four numbers in the call to par are the number of lines of text reserved on the bottom, left, top and right, respectively, ps: text size, mpg: margin size for title, axis label and axis
saved_par=par(mar=c(2.5,2.5,0,2)+0.1, ps=9, mgp=c(1.5,0.5,0));

plot(sending_rate, delay_3com, col='black', type='o', xlab=NA, ylab=NA, xlim=c(0, 1050), xaxs='i', yaxs='i');

lines(sending_rate, delay_ng, col='red', pch=19, type='o');

#title(main="Low Load Traffic", ylab=expression(paste("Packet Delay (", mu, "s)", sep="")), xlab="Packet Size (Byte)");
title(main=NA, ylab=expression(paste("Mean Packet Delay (", mu, "s)", sep="")), xlab="Sending Rate (Mb/s)");

legend('topright', legend=c('3COM 3CGSU08', 'NetGear GS108v2'), col=c('black', 'red'), pch=21:19, bty='n');

par(saved_par);

dev.off()